home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1199 / 1000 next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.2 KB

  1. From: Bjarne Pohlers <bjarne@GOEDEL.UNI-MUENSTER.DE>
  2. Subject: Another patch...
  3. Date: Fri, 11 Feb 1994 14:53:27 +0100
  4.  
  5. Hre is another patch for MiNT 1.09...
  6. My problem was: I wrote a tape device driver which needs to access a
  7. SCSI device driver and therefore calls f_open in its own open-function.
  8.  
  9. Unfortunately the code of f_open (and f_create) is not reeantrant.
  10.  
  11. *** dosfile.c.orig    Fri Feb 11 14:18:54 1994
  12. --- dosfile.c    Fri Feb 11 14:38:27 1994
  13. ***************
  14. *** 348,356 ****
  15.           mode = (mode & ~O_RWMODE) | O_RDWR;
  16.       }
  17.   
  18.       f = do_open(name, mode, 0, (XATTR *)0);
  19.   
  20.       if (!f) {
  21.           return mint_errno;
  22.       }
  23. --- 348,357 ----
  24.           mode = (mode & ~O_RWMODE) | O_RDWR;
  25.       }
  26.   
  27. +     proc->handle[i]= (FILEPTR *)1; /* Reserve this handle */
  28.       f = do_open(name, mode, 0, (XATTR *)0);
  29. +     proc->handle[i]= (FILEPTR *)0; /* and release it again */
  30.   
  31.       if (!f) {
  32.           return mint_errno;
  33.       }
  34. ***************
  35. *** 422,428 ****
  36. --- 423,431 ----
  37.           return EACCDN;
  38.       }
  39.   
  40. +     proc->handle[i]= (FILEPTR *)1; /* Reserve this handle */
  41.       f = do_open(name, O_RDWR|O_CREAT|O_TRUNC, attrib, (XATTR *)0);
  42. +     proc->handle[i]= (FILEPTR *)0; /* and release it again */
  43.   
  44.       if (!f) {
  45.           DEBUG(("Fcreate(%s) failed, error %d", name, mint_errno));
  46.